/*
 * @Author: wangyongcun@persagy.com
 * @Date: 2025-03-08 15:55:07
 * @LastEditTime: 2025-03-13 21:28:12
 * @FilePath: \vite-admin\src\router\guard\progress.ts
 * @Description:
 *
 */
export function createProgressGuard(router: Router) {
  router.beforeEach((_to, _from, next) => {
    window.NProgress?.start?.();
    next();
  });
  router.afterEach(_to => {
    window.NProgress?.done?.();
  });
}
